package com.frank.oj.service.team;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.frank.model.dto.CompileDTO;
import com.frank.model.entity.problem.Problem;
import com.frank.model.entity.problem.ProblemCase;
import com.frank.model.entity.problem.Tag;
import com.frank.oj.common.result.CommonResult;
import com.frank.oj.model.dto.ProblemDTO;
import com.frank.oj.model.vo.ProblemVO;

import java.util.List;

/**
 * @author frank
 * @Date 2024/5/4
 */
public interface GroupProblemService {
    CommonResult<IPage<ProblemVO>> getProblemList(Integer limit, Integer currentPage, Long gid);

    CommonResult<IPage<Problem>> getAdminProblemList(Integer limit, Integer currentPage, Long gid);

    CommonResult<Problem> getProblem(Long pid);

    CommonResult<Void> addProblem(ProblemDTO problemDto);

    CommonResult<Void> updateProblem(ProblemDTO problemDto);

    CommonResult<Void> deleteProblem(Long pid);

    CommonResult<List<ProblemCase>> getProblemCases(Long pid, Boolean isUpload);

    CommonResult<List<Tag>> getAllProblemTagsList(Long gid);

    CommonResult<Void> compileSpj(CompileDTO compileDTO, Long gid);

    CommonResult<Void> compileInteractive(CompileDTO compileDTO, Long gid);

    CommonResult<Void> changeProblemAuth(Long pid, Integer auth);

    CommonResult<Void> applyPublic(Long pid, Boolean isApplied);
}
